package neo.tetris.rpc.message;

import java.nio.ByteBuffer;

import neo.sourceEngine.network.rpc.message.annotation.RpcMessage;
import neo.sourceEngine.network.rpc.message.annotation.RpcMessageParameter;

public interface BattleMessage {
	@RpcMessage(desc = "开始匹配")
	ByteBuffer battleMatching();

	@RpcMessage(desc = "玩家加入")
	ByteBuffer playerSet(
			@RpcMessageParameter(name = "playerIndex") int playerIndex,
			@RpcMessageParameter(name = "playerUuid") String playerUuid,
			@RpcMessageParameter(name = "playerName") String playerName,
			@RpcMessageParameter(name = "playerHeadIcon") String playerHeadIcon);

	@RpcMessage(desc = "同步状态")
	ByteBuffer stateSynchronize(
			@RpcMessageParameter(name = "playerIndex") int playerIndex,
			@RpcMessageParameter(name = "state") String state);

	@RpcMessage(desc = "战斗开始")
	ByteBuffer battleStart(
			@RpcMessageParameter(name = "startTime") double startTime);

	@RpcMessage(desc = "战斗结束")
	ByteBuffer battleEnd(
			@RpcMessageParameter(name = "winnerId") short winnerId);

	@RpcMessage(desc = "增加难度")
	ByteBuffer addDifficult(
			@RpcMessageParameter(name = "playerIndex")int playerIndex);
}
